package com.ruoyi.fsepc.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.fsepc.domain.FseStAppVersion;
import com.ruoyi.fsepc.mapper.FseStAppVersionMapper;
import com.ruoyi.fsepc.service.IFseStAppVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * APP版本管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-04-21
 */
@Service
public class FseStAppVersionServiceImpl implements IFseStAppVersionService
{
    @Autowired
    private FseStAppVersionMapper fseStAppVersionMapper;

    /**
     * 查询APP版本管理
     * 
     * @param id APP版本管理ID
     * @return APP版本管理
     */
    @Override
    public FseStAppVersion selectFseStAppVersionById(Long id)
    {
        return fseStAppVersionMapper.selectFseStAppVersionById(id);
    }

    /**
     * 查询APP版本管理列表
     * 
     * @param fseStAppVersion APP版本管理
     * @return APP版本管理
     */
    @Override
    public List<FseStAppVersion> selectFseStAppVersionList(FseStAppVersion fseStAppVersion)
    {
        return fseStAppVersionMapper.selectFseStAppVersionList(fseStAppVersion);
    }

    /**
     * 新增APP版本管理
     * 
     * @param fseStAppVersion APP版本管理
     * @return 结果
     */
    @Override
    public int insertFseStAppVersion(FseStAppVersion fseStAppVersion)
    {
        fseStAppVersion.setCreateTime(DateUtils.getNowDate());
        return fseStAppVersionMapper.insertFseStAppVersion(fseStAppVersion);
    }

    /**
     * 修改APP版本管理
     * 
     * @param fseStAppVersion APP版本管理
     * @return 结果
     */
    @Override
    public int updateFseStAppVersion(FseStAppVersion fseStAppVersion)
    {
        fseStAppVersion.setUpdateTime(DateUtils.getNowDate());
        return fseStAppVersionMapper.updateFseStAppVersion(fseStAppVersion);
    }

    /**
     * 删除APP版本管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFseStAppVersionByIds(String ids)
    {
        return fseStAppVersionMapper.deleteFseStAppVersionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除APP版本管理信息
     * 
     * @param id APP版本管理ID
     * @return 结果
     */
    @Override
    public int deleteFseStAppVersionById(Long id)
    {
        return fseStAppVersionMapper.deleteFseStAppVersionById(id);
    }
}
